package com.victualler.business.purchase.entity;

/**
 * @author Guoshichang
 * @since 14:57 on 2018/10/5.
 */

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.victualler.core.base.dao.BaseOrderDao;
import com.victualler.core.common.annotation.InitEditColumn;
import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.enums.ColumnFormatEnum;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author Guoshichang
 * @date 16:50 on 2018/6/24.
 * @function 采购预订单主信息
 */
@Entity
@Table(name="purchase_order")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class PurchaseOrderDao extends BaseOrderDao implements Serializable {

    //预订单号
    @ListShowColumn(title = "订单号",sort = 1,type = ColumnFormatEnum.LINK)
    @InitEditColumn(title = "订单号",sort = 1,canEdit = false,required = false)
    private String orderNo;

    /**厂商id*/
    private Long venderId;

    /**供应商*/
    @ListShowColumn(title = "供应商",sort = 3)
    @InitEditColumn(title = "供应商",sort = 3,canEdit = false)
    private String venderName;

    //订单总量
    @ListShowColumn(title = "采购总量",sort = 3)
    @InitEditColumn(title = "采购总量",sort = 3,canEdit = false)
    private BigDecimal sumQuantity;

    //订单总数量
    @ListShowColumn(title = "采购金额合计",sort = 3)
    @InitEditColumn(title = "采购金额合计",sort = 3,canEdit = false)
    private BigDecimal sumInPrice;

    //订单总折扣金额
    @ListShowColumn(title = "整单折扣金额",sort = 3)
    @InitEditColumn(title = "整单折扣金额",sort = 3)
    private BigDecimal disPrice;

    //订单总折扣金额
    @ListShowColumn(title = "总结算金额",sort = 3)
    @InitEditColumn(title = "总结算金额",sort = 3,canEdit = false)
    private BigDecimal sumAllPrice;


    //备注
    @ListShowColumn(title = "备注",sort = 1)
    @InitEditColumn(title = "备注",sort = 1)
    private String reason;

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public BigDecimal getSumQuantity() {
        return sumQuantity;
    }

    public void setSumQuantity(BigDecimal sumQuantity) {
        this.sumQuantity = sumQuantity;
    }


    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public BigDecimal getSumInPrice() {
        return sumInPrice;
    }

    public void setSumInPrice(BigDecimal sumInPrice) {
        this.sumInPrice = sumInPrice;
    }

    public BigDecimal getDisPrice() {
        return disPrice;
    }

    public void setDisPrice(BigDecimal disPrice) {
        this.disPrice = disPrice;
    }

    public Long getVenderId() {
        return venderId;
    }

    public void setVenderId(Long venderId) {
        this.venderId = venderId;
    }

    public String getVenderName() {
        return venderName;
    }

    public void setVenderName(String venderName) {
        this.venderName = venderName;
    }

    public BigDecimal getSumAllPrice() {
        return sumAllPrice;
    }

    public void setSumAllPrice(BigDecimal sumAllPrice) {
        this.sumAllPrice = sumAllPrice;
    }


}
